package jiyun.com.yiyanmeng;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class WebActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);
        Intent intent = getIntent();
        String url = intent.getStringExtra("url");
        WebView web = findViewById(R.id.web);
        //用webview显示百度网页
        web.setWebViewClient(new WebViewClient());
        //设置js 直接打开窗口

        web.loadUrl(url);
        //设置不用系统浏览器打开，直接显示到当前WebView


    }
}
